/**
 * Create by ZhiXiaPing on 2018/9/28
 *
 */
// -----------全局变量的vuex
const state = {
  global: {}
}
const mutations = {
  setValue (state, variable) {
    state.global = Object.assign({}, state.global, variable)
  }
}
const getters = {
  getValue: (state) => (field) => {
    return state.global[field] || undefined
  }
}

export default {
  state,
  mutations,
  getters
}
